package com.xingshang.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xingshang.model.dto.UserDto;
import com.xingshang.model.po.Goods;
import com.xingshang.model.po.User;
import com.baomidou.mybatisplus.extension.service.IService;
import io.minio.errors.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

/**
 * @author 87547
 * @description 针对表【wn_user】的数据库操作Service
 * @createDate 2025-04-01 08:37:17
 */
public interface UserService extends IService<User> {

    public User login(String account, String password);

    public List<User> getAllUsers();

    public IPage<User> findByPage(int page, int pageSize, QueryWrapper<User> queryWrapper);


    public String insertUser(UserDto userDto) throws Exception;

    public String saveAvatar(MultipartFile avatarFile) throws Exception;

    boolean freezeUser(Long userId);
    boolean unfreezeUser(Long userId);
    boolean addToBlacklist(Long userId);
    boolean removeFromBlacklist(Long userId);
    boolean deleteUser(Long userId);
}
